import 'package:flutter/material.dart';
import 'package:hkzf_flutter/pages/home/navigator/index_navigator_item_list.dart';
import 'package:hkzf_flutter/widgets/common_image.dart';

class IndexNavigator extends StatelessWidget {
  const IndexNavigator({super.key});

  @override
  Widget build(BuildContext context) {
    return Container(
      padding: const EdgeInsets.symmetric(vertical: 10.0),// 设置上下内边距
      child: Row(
        mainAxisAlignment: MainAxisAlignment.spaceAround,// 设置主轴元素两边均分割
        children:  navigatorItemList.map((item) => InkWell(
          onTap: ()=>{
            item.onTap(context)
          },
          child: Column(
            children: [
               CommonImage(
                 src: item.imgUrl,
                 width: 47.5,
               ),
               Text(
                item.title,
                style: const TextStyle(
                  fontSize: 14,
                  fontWeight: FontWeight.bold
                )
               )
            ],
          ))
        ).toList()
      ),
    );
  }
}
